package org.hxzon.demo.groovy

class RegularDemo {

    static main(args) {
        def matchMe = "Match Me"
//        assert matchMe ==~ 'Match Me'
//        assert matchMe ==~ """Match Me"""
//        assert matchMe ==~ /Match Me/
        println matchMe ==~ 'Match Me'
        println matchMe ==~ """Match Me"""
        println matchMe ==~ /Match Me/
        
        println "---------------------"
        
        def quickBrownFox = """
        The quick brown fox
         jumps over the lazy
         dog.
        """
        def matcher = quickBrownFox =~ /\b.o.\b/
        matcher.each { match -> println match }
    }
}
